<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <head th:replace="common/head"/>
</head>
<body>
<div class="x-body">
    <form class="layui-form layui-form-pane" action="/payment/doEdit">
        <input type="hidden" name="paymentId" th:value="${myEntity.paymentId}">
        <div class="layui-inline" style="margin-bottom: 15px">
            <label class="layui-form-label">客户</label>
            <div class="layui-input-inline" style="width: 300px">
                <select name="userId" lay-verify="required" lay-search="">
                    <option value="">直接选择或搜索选择</option>
                    <th:block th:each="map: ${userList}">
                        <option th:value="${map.key}" th:text="${map.userName}" th:selected="${myEntity.userId==map.userId}"></option>
                    </th:block>
                </select>
            </div>
        </div>
        <div class="layui-inline" style="margin-bottom: 15px">
            <label class="layui-form-label">付款类型</label>
            <div class="layui-input-block" pane>
                <th:block lay-verify="required" th:each="map: ${PaymentTypeEnum}">
                    <input type="radio" name="paymentType" th:value="${map.key}" th:title="${map.value}" th:checked="${myEntity.paymentType}==${map.key}">
                </th:block>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">金额</label>
            <div class="layui-input-block" style="width: 300px">
                <input type="text" name="paymentMoney" autocomplete="off" class="layui-input" th:value="${myEntity.paymentMoney}"
                       lay-verify="required|checkDec" placeholder="必填,正数">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">实际付款金额</label>
            <div class="layui-input-block" style="width: 300px">
                <input type="text" name="realPaymentMoney" autocomplete="off" class="layui-input" th:value="${myEntity.realPaymentMoney}"
                    lay-verify="required|checkDec" placeholder="必填,正数">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">付款时间</label>
            <div class="layui-input-inline">
                <input type="text" name="payTime" lay-verify="required|checkDayTime" placeholder="yyyy-MM-dd HH:mm:ss"
                       class="layui-input dayTime" th:value="${#dates.format(myEntity.returnTime, 'yyyy-MM-dd HH:mm:ss')}">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">备注</label>
            <div class="layui-input-block">
                <textarea name="remark" placeholder="非必填" class="layui-textarea"
                          th:text="${myEntity.remark}"></textarea>
            </div>
        </div>

        <div class="layui-form-item">
            <div class="layui-input-block">
                <button class="layui-btn" style="margin-left:200px;" lay-submit lay-filter="submit">提交</button>
                <button type="reset" class="layui-btn layui-btn-primary">重置</button>
            </div>
        </div>
    </form>
</div>
<div th:replace="common/js"></div>
<div th:replace="common/setting"></div>
<script type="text/javascript">
    layui.use('xform');
</script>
</body>
</html>
